<!--
Zeke Elder - zbe@andrew.cmu.edu
Amal Chemmany - achemman@andrew.cmu.edu
Nishant Kumar - nkumar1@andrew.cmu.edu
15-637
4/2/2012
-->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:if test="${user == null}">
	<c:redirect url="welcome.jsp" />
</c:if>
<html>
<head>
<title>Welcome to FitHub!</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>

	<div class="colorbox_container">
		<table>
			<c:forEach var="error" items="${errors}">
				<tr>
					<h3 style="color: red">${error}</h3>
				</tr>
			</c:forEach>
		</table>
		<form action="addWorkout.do" method="POST" id="addWorkoutForm">
			<div style="width: 325px">
				Choose the day/time to schedule your workout. You will receive an
				email notification when it is time to workout!<br />
				<br />
			</div>
			<div>
				<select id="day" name="day">
					<option value="">Choose a Day</option>
					<option value="MON0">Monday</option>
					<option value="TUE1">Tuesday</option>
					<option value="WED2">Wednesday</option>
					<option value="THU3">Thursday</option>
					<option value="FRI4">Friday</option>
					<option value="SAT5">Saturday</option>
					<option value="SUN6">Sunday</option>
				</select> <select id="hour" name="hour">
					<option value="">Choose Hours</option>
					<c:forEach var="i" begin="0" end="23" step="1">
						<option value="${i}">${i}</option>
					</c:forEach>
				</select><select id="minutes" name="minutes">
					<option value="">Choose Minutes</option>
					<c:forEach var="i" begin="0" end="59" step="5">
						<option value="${i}">${i}</option>
					</c:forEach>
				</select><br /> <br />
			</div>

			<div>Add exercises and reps to schedule a workout!</div>
			<c:forEach var="i" begin="0" end="9" step="1">
				<div class="hiddenDiv" id="div${i}">
					<select id="exercise${i}" name="exercise${i}">
						<option value="0">Select an Exercise</option>
						<c:forEach var="item" items="${exList}">
							<option value="${item.getId()};${item.getName()}">${item.getName()
								}</option>
						</c:forEach>
					</select> <input type="text" id="reps${i}" name="reps${i}"
						placeholder="Number of Reps"><br /> <br />
				</div>
			</c:forEach>
			<div class="hiddenDiv" id="div10">Maximum limit of 10 exercises
				per workout</div>
			<div>
				<br /> <input type="hidden" name="count" id="count" value="1" /><a
					href="javascript:addRow()">add exercise</a> <input type="submit"
					name="action" value="Get Pumped!">
			</div>
		</form>

	</div>

	<script src="./js/fithub.js"></script>
</body>
</html>